package net.maku.events.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import net.maku.framework.common.utils.PageResult;
import net.maku.framework.common.utils.Result;
import net.maku.events.convert.UserJourneyConvert;
import net.maku.events.entity.UserJourneyEntity;
import net.maku.events.service.UserJourneyService;
import net.maku.events.query.UserJourneyQuery;
import net.maku.events.vo.UserJourneyVO;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;

import java.util.List;

/**
 * 用户行程
 *
 * @author 阿沐 babamu@126.com
 * @since 1.0.0 2025-03-22
 */
@RestController
@RequestMapping("events/user_journey")
@Tag(name = "用户行程")
@AllArgsConstructor
public class UserJourneyController {
    private final UserJourneyService userJourneyService;

    @GetMapping("list/{walkActivityId}")
    @Operation(summary = "查找健步走用户行程")
    public Result<List<UserJourneyVO>> list(@PathVariable("walkActivityId") Long walkActivityId) {
        return Result.ok(userJourneyService.list(walkActivityId));
    }

}